<?php

require_once dirname(__FILE__) . '/config.php';
require_once MOBILEPROXY_SPYC_DIR . '/spyc.php';
require_once MOBILEPROXY_JSPHON_DIR . '/Jsphon.php';

$headers = Spyc::YAMLLoad(MOBILEPROXY_REQUESTHEADERS_YAML);
$array = array('headersList' => array());
foreach ($headers as $key => $value) {
    $array['headersList'][] = array(
        'id'    => $key,
        'value' => $value['name']
    );
}
header('Content-Type: text/javascript;charset=UTF-8');
echo Jsphon::encode($array);
exit;
